<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>电影管理</title>

    <link href="/movie/web/Public/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/movie/web/Public/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="/movie/web/Public/static/admin/css/layout.css" rel="stylesheet">


</head>
<body>

<!-- .row必须包含在 .container(固定宽度)或 .container-fluid(100% 宽度)中，以便为其赋予合适的排列(aligment)和内补(padding)-->
<nav class="layout-header">
    <div class="container layout-width">
        <div class="row">
            <div class="col-md-12">

                <div class="pull-left">
                    <a href="" class="logo">
                        <span class="fa fa-desktop"></span> 管理后台
                    </a>
                </div>

               <!-- <div class="top-menu pull-left">
                    <ul>
                        <li>
                            <a href="<?php echo U('Index/index');?>">首页</a>
                        </li>
                        <li>
                            <a class="active" href="<?php echo U('User/index');?>">影院管理</a>

                            <div class="nav-child-menu">
                                <a href="<?php echo U('User/index');?>">影院列表</a>
                                <a href="<?php echo U('User/create');?>">影院添加</a>
                                <a>信息修改</a>
                            </div>
                        </li>
                        <li>
                            <a class="" href="<?php echo U('Movie/index');?>">电影管理</a>

                            <div class="nav-child-menu">
                                <a href="<?php echo U('Movie/index');?>">电影列表</a>
                                <a href="<?php echo U('Movie/add');?>">电影添加</a>
                                <a>信息修改</a>
                            </div>
                        </li>
                    </ul>
                </div>-->

                <div class="pull-right">
                <span class="account-info">
                    <span>欢迎您 :<?php echo \Admin\Model\Admin::user()['username']; ?></span>
                    <a class="login-out" href="<?php echo U('Default/loginout');?>">退出</a>
                </span>

                </div>

            </div>
        </div>
    </div>
</nav>

<section class="container layout-main layout-width">
    <div class="row">
        <div class="col-md-12 display-table">

            <!--左菜单区域-->
            <div class="layout-menu">

                <ul class="main-menu">
                    <li class="level-2 <?php if (isset($active) && $active=='user'){echo 'active';}?>">
                        <span class="menu-item"  >
                            <a class="menu-item" href="<?php echo U('User/index');?>">
                            <i class="icon glyphicon glyphicon-th-large"></i>
                            <i class="icon pull-right"></i>
                            <span>影院管理</span>
                            </a>
                        </span>
                    </li>

                    <!--<li class="level-2 active">
                        <a class="menu-item" href="<?php echo U('User/index');?>">
                            <i class="icon"></i>
                            <i class="icon pull-right"></i>
                            <span>影院列表</span>
                        </a>
                    </li>-->

                  <!--  <li class="level-2">
                        <a class="menu-item" href="<?php echo U('User/create');?>">
                            <i class="icon"></i>
                            <i class="icon pull-right"></i>
                            <span>影院添加</span>
                        </a>
                    </li>

                    <li class="level-2">
                        <a class="menu-item">
                            <i class="icon"></i>
                            <i class="icon pull-right"></i>
                            <span>信息修改</span>
                        </a>
                    </li>-->
                    <li  class="level-2 <?php if (isset($active) && $active=='m'){echo 'active';}?>">
                        <span class="menu-item">
                            <a class="menu-item" href="<?php echo U('Movie/index');?>">
                            <i class="icon glyphicon glyphicon-th-large"></i>
                            <i class="icon pull-right"></i>
                            <span>电影管理</span>
                            </a>
                        </span>
                    </li>

                    <!--<li class="level-2 active">
                        <a class="menu-item" href="<?php echo U('Movie/index');?>">
                            <i class="icon"></i>
                            <i class="icon pull-right"></i>
                            <span>电影列表</span>
                        </a>
                    </li>-->

                    <!--<li class="level-2">
                        <a class="menu-item" href="<?php echo U('Movie/add');?>">
                            <i class="icon"></i>
                            <i class="icon pull-right"></i>
                            <span>电影添加</span>
                        </a>
                    </li>

                    <li class="level-2">
                        <a class="menu-item">
                            <i class="icon"></i>
                            <i class="icon pull-right"></i>
                            <span>信息修改</span>
                        </a>
                    </li>-->

                </ul>

            </div>
            <!-- 左菜单区域结束-->
            
<!--右内容区域-->
            <div class="layout-content">

                <div class="page-title">电影管理</div>

                <div class="content-top">
                    <ul class="top-nav">
                        <li class="active"><span>电影列表</span></li>
                    </ul>
                    <div class="clearfix"></div>
                </div>


                <!--content-main start-->
                <div class="container-fluid content-main">
                    <div class="row">
                        <div class="col-md-12">
                            <?php if(isset($_SESSION['message'])) { $message=$_SESSION['message']; unset($_SESSION['message']); ?>
                            <div class="ui-tips bg-info">
                                <span class="icon glyphicon glyphicon-info-sign"></span>
                                <span><?php echo $message;?></span>
                            </div>
                            <?php }?>
                        </div>

                            <form action="<?php echo U('index');?>" method="get" class="form-inline form-search mt15">
                                <div class="form-group">
                                    <label>关键字搜索</label>
                                    <input type="text" placeholder="电影名称" value="<?php echo ($name); ?>" class="form-control input-sm" name="name"/>
                                </div>

                                <div>
                                    <button type="submit" class="btn btn-success btn-sm">
                                        <span class="glyphicon glyphicon-search"></span> 搜索
                                    </button>
                                </div>
                            </form>

                            <div class="mt15 pr15">
                                <a href="<?php echo U('add');?>" class="btn btn-sm btn-success pull-right"><span
                                        class="glyphicon glyphicon-plus"></span> 添加记录</a>

                                <div class="clearfix"></div>
                            </div>

                            <table class="table table-hover mt15">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>电影名称</th>
                                    <th>封面图片</th>
                                    <th>简介</th>
                                    <th>评分</th>
                                    <th>演员列表</th>
                                    <th>上映时间</th>
                                    <th>电影时长</th>
                                    <th>标签</th>
                                    <th>语言</th>
                                    <th width="120">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php if(is_array($list)): foreach($list as $key=>$val): ?><tr>
                                    <td><?php echo ($val['id']); ?></td>
                                    <td><?php echo ($val['name']); ?></td>
                                    <td><img src="/movie/web<?php echo ($val['cover']); ?>"/></td>
                                    <td><?php echo ($val['summary']); ?></td>
                                    <td><?php echo ($val['score']); ?></td>
                                    <td><?php echo ($val['actore']); ?></td>
                                    <td><?php echo ($val['release_at']); ?></td>
                                    <td><?php echo ($val['long']); ?>分钟</td>
                                    <td><?php echo ($val['tags']); ?></td>
                                    <td><?php echo ($val['language']); ?></td>
                                    <td>
                                        <a href="<?php echo U('update',['id'=>$val['id']]);?>">修改</a>
                                    </td>
                                </tr><?php endforeach; endif; ?>
                                </tbody>
                            </table>

                            <div class="pull-right">
                                <?php echo ($page); ?>
                                <!-- <span>共 100 条记录 </span>
                                 <span>每页 20 条</span>
                                 <span class="pagination">
                                     <span class="prev-page disabled">上一页</span>
                                     <span class="active">1</span>
                                     <a href="">2</a>
                                     <a href="">3</a>
                                     <a href="" class="next-page">下一页</a>
                                 </span>-->
                            </div>
                            <div class="clearfix"></div>

                        </div>
                    </div>

                </div>
                <!--content-main end-->

            </div>
            <!--右内容区域结束-->


            <div class="clearfix"></div>
        </div>
    </div>
</section>

<footer class="layout-footer">
    <div class="container layout-width">
        <div class="row">
            <div class="col-md-12">
                <ul class="links">
                    <li><a href="" target="_blank">关于我们</a></li>
                    <li><a href="" target="_blank">服务协议</a></li>
                    <li><a href="" target="_blank">运营规范</a></li>
                    <li><a href="" target="_blank">客服中心</a></li>
                    <li><a href="" target="_blank">在线客服</a></li>
                    <li><p class="copyright">Copyright.All Rights Reserved.</p></li>
                </ul>
            </div>
        </div>
    </div>
</footer>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="/movie/web/Public/static/ie8/html5shiv.min.js"></script>
<script src="/movie/web/Public/static/ie8/respond.min.js"></script>
<![endif]-->

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/movie/web/Public/static/jquery/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/movie/web/Public/static/bootstrap/js/bootstrap.min.js"></script>

</body>
</html>